home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Resources / Chat & Communication / Digsby build 37 / digsby_setup.exe / lib / gui / draw.pyo (.txt) < prev    next >
Python Compiled Bytecode  |  2008-10-13  |  964b  |  31 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.5)
  3.  
  4. import wx
  5.  
  6. def border(dc, rect, top = True, bottom = True, left = True, right = True, rounded = False, size = None):
  7.     dc.SetPen(wx.BLACK_PEN)
  8.     if top and bottom and left and right:
  9.         dc.SetBrush(wx.TRANSPARENT_BRUSH)
  10.         if rounded:
  11.             dc.DrawRoundedRectangle(rect.x, rect.y, rect.width, rect.height, rounded)
  12.         else:
  13.             dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height)
  14.     else:
  15.         pen_width = dc.GetPen().GetWidth()
  16.         bottompos = rect.y + rect.height - pen_width
  17.         rightpos = rect.x + rect.width - pen_width
  18.         if top:
  19.             dc.DrawLine(rect.x, rect.y, rightpos, rect.y)
  20.         
  21.         if bottom:
  22.             dc.DrawLine(rect.x, bottompos, rightpos, bottompos)
  23.         
  24.         if left:
  25.             dc.DrawLine(rect.x, rect.y, rect.x, bottompos)
  26.         
  27.         if right:
  28.             dc.DrawLine(rightpos, rect.y, rightpos, bottompos)
  29.         
  30.  
  31.